<?php
// +----------------------------------------------------------------------
// | 权限认证公共模块
// +----------------------------------------------------------------------
// | Author: TongBC <501468940@qq.com>
// +----------------------------------------------------------------------
// | Date  : 2015/08/10
// +----------------------------------------------------------------------
if($_SESSION['dtype']==6){
	
	$auth_status = 0;

	// 获取执行的页面
	$script_a = explode('/', $_SERVER['SCRIPT_NAME']);
	$script_b = end($script_a);

	$auth_record_a = explode(',', $_SESSION['qx']);
	if(count($auth_record_a)){
		foreach($auth_record_a as $row){
			if(in_array($script_b, $_auth[$row]['url'])){
				$auth_status = 1;
				break;
			}
		}
	}
	if($auth_status==0) exit('当前页面无权限操作，返回<a href="/home.html">首页</a>');
}
if($_SESSION['sid']==108){

    // 获取执行的页面
    // $script_a = explode('/', $_SERVER['SCRIPT_NAME']);
    // $script_b = end($script_a);

    // $auth = array('plist.html','terminal_chk.html','home.html','account_info.html','enterprise_info.html','contact.html','certifi.html','operlist.html','operatorRecord.html','addoper.html','soap.html','notice.html','Sendnotice.html','chPs.html','productOrder.html','orderSuc.html','partner.html');
    // if(!in_array($script_b, $auth)){
        // echo '<script>window.location.href="home.html";</script>';
        // exit;
    // }
}

